package top.healthylife.springbootdemo01.service.impl;/*
 *@Author GaoZeXi
 *@Created time 2020/4/29 9:49
 *@Description:
 * Step by Step  and Stand on,  You Are The Best Investment!!!
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.healthylife.springbootdemo01.dao.StudentMapper;
import top.healthylife.springbootdemo01.domain.Student;
import top.healthylife.springbootdemo01.service.StudentService;

import java.util.List;

/**
 * @author GaoZeXi
 */
@Service("studentService")
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<Student> findAll() {
        return studentMapper.findAll();
    }

    @Override
    public void update(Integer id,String field,String value) {
        studentMapper.updateById(id,field,value);
    }

    @Override
    public void add(Student student) {

    }

    @Override
    public void delete(Integer id) {
        studentMapper.deleteById(id);
    }
}
